<html>
<head><meta charset="utf-8"><title>crox graphs to LLVM CGU? · t-compiler/wg-self-profile · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/index.html">t-compiler/wg-self-profile</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/crox.20graphs.20to.20LLVM.20CGU.3F.html">crox graphs to LLVM CGU?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="185363210"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/crox%20graphs%20to%20LLVM%20CGU%3F/near/185363210" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alex Crichton <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/crox.20graphs.20to.20LLVM.20CGU.3F.html#185363210">(Jan 11 2020 at 00:01)</a>:</h4>
<p>I was recently poking around at <a href="https://github.com/bytecodealliance/cranelift/issues/1318" target="_blank" title="https://github.com/bytecodealliance/cranelift/issues/1318">https://github.com/bytecodealliance/cranelift/issues/1318</a> and it was a case where the crox graphs in Chrome clearly showed that one CGU was massively slower compared to the rest, and I was curious to try to dig into the CGU and see what functions were inside there to translate it to source. I ended up finding a bit of a roundabout method to do it but was curious, is there a better way nowadays to correlate CGUs in cros with actual bitcode files?</p>



<a name="185364226"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/crox%20graphs%20to%20LLVM%20CGU%3F/near/185364226" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> andjo403 <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/crox.20graphs.20to.20LLVM.20CGU.3F.html#185364226">(Jan 11 2020 at 00:16)</a>:</h4>
<p>Last time that I was looking at some thing like this I used the debug traces that I have updated in <a href="https://github.com/rust-lang/rust/pull/65175" target="_blank" title="https://github.com/rust-lang/rust/pull/65175">https://github.com/rust-lang/rust/pull/65175</a></p>



<a name="185364304"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/crox%20graphs%20to%20LLVM%20CGU%3F/near/185364304" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> andjo403 <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/crox.20graphs.20to.20LLVM.20CGU.3F.html#185364304">(Jan 11 2020 at 00:18)</a>:</h4>
<p>Do not think that there is any way to get that from crox logs</p>



<a name="185364329"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/crox%20graphs%20to%20LLVM%20CGU%3F/near/185364329" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zoxc <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/crox.20graphs.20to.20LLVM.20CGU.3F.html#185364329">(Jan 11 2020 at 00:19)</a>:</h4>
<p>Is that an incremental build? If so that would explain why CGUs are unbalanced</p>



<a name="185475916"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/crox%20graphs%20to%20LLVM%20CGU%3F/near/185475916" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/crox.20graphs.20to.20LLVM.20CGU.3F.html#185475916">(Jan 13 2020 at 09:15)</a>:</h4>
<p>I hope I'll get around to adding support for CGU names some time this week.</p>



<a name="188436077"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/crox%20graphs%20to%20LLVM%20CGU%3F/near/188436077" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/crox.20graphs.20to.20LLVM.20CGU.3F.html#188436077">(Feb 18 2020 at 09:40)</a>:</h4>
<p>Hi! I have a profile where a couple of CGUs seem to take a lot of time to ThinLTO (there's a 21s one, whole crate takes 80s). I suppose there's no much to do it, but does anyone want to take a look? I haven't seen many of these profiles, so perhaps there's something interesting in there. I uploaded it to <a href="https://send.firefox.com/download/3d3511db0db3ed98/#ZYyoAH_gSESkAvnyVzwWoQ" target="_blank" title="https://send.firefox.com/download/3d3511db0db3ed98/#ZYyoAH_gSESkAvnyVzwWoQ">https://send.firefox.com/download/3d3511db0db3ed98/#ZYyoAH_gSESkAvnyVzwWoQ</a>. The link expires in 7 days, but I can upload it again after that.</p>



<a name="188629617"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/crox%20graphs%20to%20LLVM%20CGU%3F/near/188629617" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/crox.20graphs.20to.20LLVM.20CGU.3F.html#188629617">(Feb 20 2020 at 11:34)</a>:</h4>
<p><span class="user-mention" data-user-id="116015">@Alex Crichton</span> this should work now with <code>-Z self-profile -Z self-profile-events=default,function-args</code>.</p>



<a name="188629650"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/crox%20graphs%20to%20LLVM%20CGU%3F/near/188629650" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/crox.20graphs.20to.20LLVM.20CGU.3F.html#188629650">(Feb 20 2020 at 11:35)</a>:</h4>
<p>you can also do <code>-Z self-profile -Z self-profile-events=default,args</code>. That will give you query-keys too.</p>



<a name="188644212"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/crox%20graphs%20to%20LLVM%20CGU%3F/near/188644212" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alex Crichton <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/crox.20graphs.20to.20LLVM.20CGU.3F.html#188644212">(Feb 20 2020 at 14:53)</a>:</h4>
<p><span class="user-mention" data-user-id="124287">@mw</span> nice!</p>



<a name="188644383"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/crox%20graphs%20to%20LLVM%20CGU%3F/near/188644383" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/crox.20graphs.20to.20LLVM.20CGU.3F.html#188644383">(Feb 20 2020 at 14:54)</a>:</h4>
<p>Let me know if you see things showing up as <code>&lt;unknown&gt;</code> in the output. I think there might be a bug somewhere. At least I've seen two separate reports so far.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>